package org.reliablesource.prism.gef.editor.figures;

import org.eclipse.draw2d.Button;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.reliablesource.prism.gef.editor.PrismEditorPlugin;

/**
 *
 *  ThumbnailFigure.java
 *  Copyright (c) 2006, Reliable Source, Inc. All Rights Reserved
 *
 *	Created on: Apr 11, 2006 
 *  @author Dennis Park 
 *  <a href="mailto:dennis.park@gmail.com">dennis.park@gmail.com</a>
 *
 */

public class ThumbnailFigure extends Button{

	ImageDescriptor image;

	public ThumbnailFigure() {
		image  = PrismEditorPlugin.getImageDescriptor("icons/pointer.gif");
	}

	protected void paintFigure(final Graphics graphics) {
		super.paintFigure(graphics);
		if (image != null) {
			graphics.drawImage(image.createImage(), new Rectangle(image.createImage().getBounds()), new Rectangle(75, 75, 135, 135));
		}
	}


}
